Repository navigation
ci: run the codegen-ts conformance suite with bun test --parallel - #591
Merged
Merged
Conversation
…allel gate_conf_ts ran both suites serially. Run them with the same worker count the integration suite uses (MO_CI_TS_WORKERS, default 6). Same tests, same counts; three repeat runs showed no order or shared-state failures. The migrate-ts suite stays in both ts-fast (no Postgres, pg-mem paths) and ts-slow (real Postgres).
…-ts and cli conformance runs: CONTRIBUTING.md now lists those suites under MO_CI_TS_WORKERS. The script's header comment and inline comments already matched the change, and no other doc describes these suites as serial.
… --parallel Under --parallel the cli tests that spawn prisma starved and timed out on the small hosted runner (pr-ci ts-fast). The cli suite goes back to serial; the codegen-ts suite stays parallel.
dmealing
force-pushed
the
fm/mo-ci-runners-pr2
branch
from
November 17, 2026 22:26
31bb8ff to
506de41
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
codegen-tsconformance suite ingate_conf_ts(scripts/ci-local.sh) now runsbun test --parallel="${MO_CI_TS_WORKERS:-6}"instead of serially — its test files are independent (each builds its own model and writes to its ownmkdtempdirectory), so they no longer spend minutes waiting on each other.cliconformance suite deliberately stays serial: under--parallel, its tests that spawn Prisma starved and timed out on the small hosted runner (pr-ci ts-fast); the comment records this so it is not "optimized" later.CONTRIBUTING.mdand the script's header comment to document thatMO_CI_TS_WORKERSnow governs both the TypeScript integration suite and thecodegen-tsconformance suite.Timings (before and after)
Measured on a shared 32-thread workstation that was heavily loaded by other jobs (load average 20-35 at the start of each run, up to about 98 during the last 4-core run), so absolute numbers are noisy; the serial and parallel runs were interleaved on the same machine.
--parallel=6(after), 3 runscodegen-ts(3,721 tests)cli(2,092 tests)The
clisuite was first parallelised too, but its Prisma-spawning tests timed out on the small hosted runner (pr-ci ts-fast), so this PR keepscliserial and parallelises onlycodegen-ts. Serialcliis unchanged by this PR: 3 of 3 runs pass (2,081 pass, 0 fail) pinned to 4 cores withtaskset, andcodegen-tsunder--parallel=6also passes pinned to 4 cores (3,721 pass, 0 fail), though that run took 211 s because the host load was about 98 at the time, so it says nothing about speed.migrate-ts de-duplication: not done
The
migrate-tssuite runs in bothts-fast(pg-mem, no Postgres) andts-slow(real Postgres). Neither is a strict superset of the other (different engine paths, andpr-cihas no Postgres lane), so both are kept rather than risk dropping coverage.Validation
Risk Assessment
✅ Low: A well-bounded CI concurrency change: the flag form and worker-count env reuse mirror the already-proven integration-test.sh pattern, the parallelized suite's test files are verified isolated (mkdtemp everywhere, env-gated golden writes), no check is weakened, and both doc surfaces match the final code; only a mild flake watch-item on light subprocess-spawning tests remains.
Testing
Ran the two suites the change touches with the exact ci-local.sh lane commands. codegen-ts passes under the new --parallel=6 invocation about 2.7x faster than serial with identical test counts, the MO_CI_TS_WORKERS override demonstrably changes the worker count, and the deliberately-serial cli suite still passes. All green; broad regression supplied by the pre-run configured command.
bun test --timeout 30000 --parallel=6command (the runtime behavior this PR adds)${MO_CI_TS_WORKERS:-6}expansion runs in 108.9s (serial), vs 39.15s at the default 6bun test --timeout 30000Evidence: codegen-ts suite, new parallel lane command (--parallel=6): 3721 pass / 0 fail / 39.15s
Evidence: codegen-ts suite, serial --parallel=1 (first run: 105.9s)
Evidence: codegen-ts suite, serial --parallel=1 (reproducibility re-run: 103.9s)
Evidence: codegen-ts suite, MO_CI_TS_WORKERS=1 via bash -c (expansion sees the var): 108.9s — override honored
Evidence: cli suite, serial lane command: 2092 tests, 0 fail, 115.8s
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
scripts/ci-local.sh:675- The codegen-ts suite now runs 6-way parallel on the small hosted pr-ci ts-fast runner, and it still contains subprocess-spawning tests that keep bun's default 5s per-test timeout: test/requirement-stub-executes.test.ts:42 and test/requirement-test-escaping.test.ts:59 (Bun.spawnSync ofbun test), test/layout-ratchet.test.ts:261 and test/overwrite-policy/missing-git.test.ts (git). This is the same starvation-timeout class the diff itself documents as the reason the cli suite stays serial (scripts/ci-local.sh:673-674, prisma starved under --parallel). These spawns are light (a stub test file, read-only git) unlike cli's prisma engines, so no concrete failure is established — a watch item for the first hosted ts-fast runs, with a cheap follow-up hardening: setDefaultTimeout(COMPILE_TEST_TIMEOUT_MS) in those four files, matching the compile tests' own load-absorption rationale in test/compile-timeout.ts.✅ **Test** - passed
✅ No issues found.
bun test --timeout 30000 --parallel=6command (the runtime behavior this PR adds)${MO_CI_TS_WORKERS:-6}expansion runs in 108.9s (serial), vs 39.15s at the default 6bun test --timeout 30000scripts/ci-local.sh --affected --strict-toolchainsscripts/ci_local.sh --affected --strict-toolchains (baseline, ran green before this turn; not re-run because no source changed)cd server/typescript/packages/codegen-ts && bun test --timeout 30000 --parallel=6 (exact new lane command; 3721 pass, 0 fail, 39.15s)cd server/typescript/packages/codegen-ts && bun test --timeout 30000 --parallel=1 (twice; 105.9s and 103.9s — proves the suite really runs concurrently at 6 and the same tests run either way)MO_CI_TS_WORKERS=1 bash -c 'bun test --timeout 30000 --parallel="${MO_CI_TS_WORKERS:-6}"' in codegen-ts (108.9s, matches serial — override reaches the flag; an earlier env-prefix variant that expanded to the default 6 was discarded as my own methodology bug)cd server/typescript/packages/cli && bun test --timeout 30000 (2092 tests, 0 fail, 115.8s — suite the final commit keeps serial)✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.